package wowraidmanager.client.wishlist.utils;

import java.util.ArrayList;

import wowraidmanager.shared.model.wishlist.RaidbossDroplist;

public class RaidbossDroplistUtil{

    public static ArrayList<String> getGameversion(ArrayList<RaidbossDroplist> raidbossDroplist){
        ArrayList<String> gameversionList = new ArrayList<String>();

        for(RaidbossDroplist droplist:raidbossDroplist){
            String gameversion = droplist.getGameVersion();
            if(!gameversionList.contains(gameversion)){
                gameversionList.add(gameversion);
            }
        }

        return gameversionList;
    }

    public static ArrayList<String> getRaidzone(ArrayList<RaidbossDroplist> raidbossDroplist){
        ArrayList<String> raidzoneList = new ArrayList<String>();

        for(RaidbossDroplist droplist:raidbossDroplist){
            String raidzone = droplist.getRaidzone();
            if(!raidzoneList.contains(raidzone)){
                raidzoneList.add(raidzone);
            }
        }

        return raidzoneList;
    }

    public static ArrayList<RaidbossDroplist> getRaidbossdroplistGameVersion(ArrayList<RaidbossDroplist> raidbossDroplist, String gameversion){
        ArrayList<RaidbossDroplist> newRaidbossdroplist = new ArrayList<RaidbossDroplist>();

        for(RaidbossDroplist droplist:raidbossDroplist){
            if(droplist.getGameVersion().equals(gameversion)){
                newRaidbossdroplist.add(droplist);
            }
        }

        return newRaidbossdroplist;
    }

    public static ArrayList<RaidbossDroplist> getRaidbossdroplistRaidzone(ArrayList<RaidbossDroplist> raidbossDroplist, String raidzone){
        ArrayList<RaidbossDroplist> newRaidbossdroplist = new ArrayList<RaidbossDroplist>();

        for(RaidbossDroplist droplist:raidbossDroplist){
            if(droplist.getRaidzone().equals(raidzone)){
                newRaidbossdroplist.add(droplist);
            }
        }

        return newRaidbossdroplist;
    }
}
